#include <stdio.h>

char a[3][4];

/* 以行优先的顺序填充数据 */

int hang()
{
	int x, y;

	/* 清空数组 */
	for (x = 0; x < 3; x++)
		for (y = 0; y < 4; y++)
			a[x][y] = 0;

	/* 填充第二行 */
	for (y = 0; y < 4; y++)
		a[1][y] = y;

	return 0;
}

/* 以列优先的顺序填充数据 */

int lie()
{
	int x, y;

	/* 清空数组 */
	for (x = 0; x < 3; x++)
		for (y = 0; y < 4; y++)
			a[x][y] = 0;

	/* 填充第三列 */
	for (x = 0; x < 3; x++)
		a[x][2] = x;

	return 0;
}

/* 以下是以一维数组的方式访问二维数组 */
char get_by_coordinates1(char array[3][4], int a, int b)
{
	return array[a][b];
}

char get_by_coordinates2(char * array, int a, int b)
{
	/* treat input array as one-dimensional */
	/* 4 is array width here */
	return array[a*4+b];
}

char get_by_coordinates3(char * array, int a, int b)
{
	/* treat input array as pointer, 
	   calculate address, get value at is 4 is array width here */
	return *(array+a*4+b);
	  
}

int main()
{
	a[2][3] = 123;

	printf("%d\n", get_by_coordinates1(a, 2, 3));
	printf("%d\n", get_by_coordinates2(a[0], 2, 3));
	printf("%d\n", get_by_coordinates3(a[0], 2, 3));

	return 0;
}


#if 0
/*
 * intel
 */

0000000000001149 <hang>:
    1149:	f3 0f 1e fa          	endbr64 
    114d:	55                   	push   %rbp
    114e:	48 89 e5             	mov    %rsp,%rbp

    1151:	c7 45 f8 00 00 00 00 	movl   $0x0,-0x8(%rbp)		// for x=0
    1158:	eb 36                	jmp    1190 <hang+0x47>		// x jump
    115a:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%rbp)		// for y=0
    1161:	eb 23                	jmp    1186 <hang+0x3d>		// y jump
    1163:	8b 45 fc             	mov    -0x4(%rbp),%eax		// eax=y
    1166:	48 98                	cltq   				// rax=y
    1168:	8b 55 f8             	mov    -0x8(%rbp),%edx		// edx=x
    116b:	48 63 d2             	movslq %edx,%rdx		// rdx=x
    116e:	48 c1 e2 02          	shl    $0x2,%rdx		// rdx=x<<2
    1172:	48 01 c2             	add    %rax,%rdx		// rdx=x<<2+y
    1175:	48 8d 05 9c 2e 00 00 	lea    0x2e9c(%rip),%rax        # 4018 <a>	rax=a		117c+0x2e9c=4018
    117c:	48 01 d0             	add    %rdx,%rax		// rax=a+(x<<2+y)
    117f:	c6 00 00             	movb   $0x0,(%rax)		// (rax)=0
    1182:	83 45 fc 01          	addl   $0x1,-0x4(%rbp)		// y++
    1186:	83 7d fc 03          	cmpl   $0x3,-0x4(%rbp)		// 0x3-y
    118a:	7e d7                	jle    1163 <hang+0x1a>
    118c:	83 45 f8 01          	addl   $0x1,-0x8(%rbp)		// x++
    1190:	83 7d f8 02          	cmpl   $0x2,-0x8(%rbp)		// 0x2-x
    1194:	7e c4                	jle    115a <hang+0x11>

    1196:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%rbp)		// y=0
    119d:	eb 18                	jmp    11b7 <hang+0x6e>
    119f:	8b 45 fc             	mov    -0x4(%rbp),%eax		// eax=y
    11a2:	89 c1                	mov    %eax,%ecx		// ecx=y
    11a4:	8b 45 fc             	mov    -0x4(%rbp),%eax		// eax=y
    11a7:	48 98                	cltq   				// rax=y
    11a9:	48 8d 15 6c 2e 00 00 	lea    0x2e6c(%rip),%rdx        # 401c <a+0x4>	rdx=a+0x4  11b0+2e6c=401c
    11b0:	88 0c 10             	mov    %cl,(%rax,%rdx,1)	// (y+(a+0x4)*1=cl
    11b3:	83 45 fc 01          	addl   $0x1,-0x4(%rbp)		// y++
    11b7:	83 7d fc 03          	cmpl   $0x3,-0x4(%rbp)		// 0x3-y
    11bb:	7e e2                	jle    119f <hang+0x56>
    11bd:	b8 00 00 00 00       	mov    $0x0,%eax
    11c2:	5d                   	pop    %rbp
    11c3:	c3                   	retq   

00000000000011c4 <lie>:
    11c4:	f3 0f 1e fa          	endbr64 
    11c8:	55                   	push   %rbp
    11c9:	48 89 e5             	mov    %rsp,%rbp
    11cc:	c7 45 f8 00 00 00 00 	movl   $0x0,-0x8(%rbp)	// x=0
    11d3:	eb 36                	jmp    120b <lie+0x47>	// for x
    11d5:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%rbp)	// y=0
    11dc:	eb 23                	jmp    1201 <lie+0x3d>	// for y
    11de:	8b 45 fc             	mov    -0x4(%rbp),%eax	
    11e1:	48 98                	cltq   			// rax=y
    11e3:	8b 55 f8             	mov    -0x8(%rbp),%edx	
    11e6:	48 63 d2             	movslq %edx,%rdx	// rdx=x
    11e9:	48 c1 e2 02          	shl    $0x2,%rdx	// rdx=x<<2
    11ed:	48 01 c2             	add    %rax,%rdx	// rdx=(x<<2)+y
    11f0:	48 8d 05 21 2e 00 00 	lea    0x2e21(%rip),%rax        # 4018 <a>	rax=a
    11f7:	48 01 d0             	add    %rdx,%rax	// rax=a+(x<<2)+y
    11fa:	c6 00 00             	movb   $0x0,(%rax)	// (rax)=0
    11fd:	83 45 fc 01          	addl   $0x1,-0x4(%rbp)	// y++
    1201:	83 7d fc 03          	cmpl   $0x3,-0x4(%rbp)	// 0x3-y
    1205:	7e d7                	jle    11de <lie+0x1a>
    1207:	83 45 f8 01          	addl   $0x1,-0x8(%rbp)	// x++
    120b:	83 7d f8 02          	cmpl   $0x2,-0x8(%rbp)	// 0x2-x
    120f:	7e c4                	jle    11d5 <lie+0x11>
    1211:	c7 45 f8 00 00 00 00 	movl   $0x0,-0x8(%rbp)	// x=0
    1218:	eb 20                	jmp    123a <lie+0x76>
    121a:	8b 45 f8             	mov    -0x8(%rbp),%eax	// eax=x
    121d:	89 c1                	mov    %eax,%ecx	// ecx=x
    121f:	8b 45 f8             	mov    -0x8(%rbp),%eax	
    1222:	48 98                	cltq   			// rax=x
    1224:	48 8d 14 85 00 00 00 	lea    0x0(,%rax,4),%rdx	// rdx=(x*4)+0x0
    122b:	00 
    122c:	48 8d 05 e7 2d 00 00 	lea    0x2de7(%rip),%rax        # 401a <a+0x2>	rax=a+2
    1233:	88 0c 02             	mov    %cl,(%rdx,%rax,1)	// ((x*4)+(a+2)*1)=cl
    1236:	83 45 f8 01          	addl   $0x1,-0x8(%rbp)		// x++
    123a:	83 7d f8 02          	cmpl   $0x2,-0x8(%rbp)		// 0x2-x
    123e:	7e da                	jle    121a <lie+0x56>
    1240:	b8 00 00 00 00       	mov    $0x0,%eax
    1245:	5d                   	pop    %rbp
    1246:	c3                   	retq   

0000000000001247 <get_by_coordinates1>:
    1247:	f3 0f 1e fa          	endbr64 
    124b:	55                   	push   %rbp
    124c:	48 89 e5             	mov    %rsp,%rbp
    124f:	48 89 7d f8          	mov    %rdi,-0x8(%rbp)	// (rbp-0x8)=rdi parameter
    1253:	89 75 f4             	mov    %esi,-0xc(%rbp)	// (rbp-0xc)=esi parameter
    1256:	89 55 f0             	mov    %edx,-0x10(%rbp)	// (rbp-0x10)=edx parameter
    1259:	8b 45 f4             	mov    -0xc(%rbp),%eax
    125c:	48 98                	cltq   				// rax=(rbp-0xc)
    125e:	48 8d 14 85 00 00 00 	lea    0x0(,%rax,4),%rdx	// rdx=((rbp-0xc)*4)+0x0
    1265:	00 
    1266:	48 8b 45 f8          	mov    -0x8(%rbp),%rax		// rax=(rbp-0x8)
    126a:	48 01 c2             	add    %rax,%rdx		// rdx=(rbp-0x8)+((rbp-0xc)*4)+0x0
    126d:	8b 45 f0             	mov    -0x10(%rbp),%eax		// eax=(rbp-0x10)
    1270:	48 98                	cltq   				// rax=(rbp-0x10)
    1272:	0f b6 04 02          	movzbl (%rdx,%rax,1),%eax	// eax=((rbp-0x8)+[(rbp-0xc)*4)+0x0]+[(rbp-0x10)*1]
    1276:	5d                   	pop    %rbp
    1277:	c3                   	retq   

0000000000001278 <get_by_coordinates2>:
    1278:	f3 0f 1e fa          	endbr64 
    127c:	55                   	push   %rbp
    127d:	48 89 e5             	mov    %rsp,%rbp
    1280:	48 89 7d f8          	mov    %rdi,-0x8(%rbp)		// (rbp-0x8)=rdi
    1284:	89 75 f4             	mov    %esi,-0xc(%rbp)		// (rbp-0xc)=esi
    1287:	89 55 f0             	mov    %edx,-0x10(%rbp)		// (rbp-0x10)=edx
    128a:	8b 45 f4             	mov    -0xc(%rbp),%eax		// eax=(rbp-0xc)
    128d:	8d 14 85 00 00 00 00 	lea    0x0(,%rax,4),%edx	// edx=(rbp-0xc)*4+0x0
    1294:	8b 45 f0             	mov    -0x10(%rbp),%eax		// eax=(rbp-0x10)
    1297:	01 d0                	add    %edx,%eax		// eax=[(rbp-0xc)*4+0x0]+(rbp-0x10)
    1299:	48 63 d0             	movslq %eax,%rdx		// rdx=[(rbp-0xc)*4+0x0]+(rbp-0x10)
    129c:	48 8b 45 f8          	mov    -0x8(%rbp),%rax		// rax=(rbp-0x8)
    12a0:	48 01 d0             	add    %rdx,%rax		// rax=(rbp-0x8)+[(rbp-0xc)*4+0x0]+(rbp-0x10)
    12a3:	0f b6 00             	movzbl (%rax),%eax		// eax=((rbp-0x8)+[(rbp-0xc)*4+0x0]+(rbp-0x10))
    12a6:	5d                   	pop    %rbp
    12a7:	c3                   	retq   

00000000000012a8 <get_by_coordinates3>:
    12a8:	f3 0f 1e fa          	endbr64 
    12ac:	55                   	push   %rbp
    12ad:	48 89 e5             	mov    %rsp,%rbp
    12b0:	48 89 7d f8          	mov    %rdi,-0x8(%rbp)		// (rbp-0x8)=rdi
    12b4:	89 75 f4             	mov    %esi,-0xc(%rbp)		// (rbp-0xc)=esi
    12b7:	89 55 f0             	mov    %edx,-0x10(%rbp)		// (rbp-0x10)=edx
    12ba:	8b 45 f4             	mov    -0xc(%rbp),%eax		// eax=(rbp-0xc)
    12bd:	c1 e0 02             	shl    $0x2,%eax		// eax=(rbp-0xc)<<2
    12c0:	48 63 d0             	movslq %eax,%rdx		// rdx=(rbp-0xc)<<2
    12c3:	8b 45 f0             	mov    -0x10(%rbp),%eax		// eax=(rbp-0x10)
    12c6:	48 98                	cltq   				// rax=(rbp-0x10)
    12c8:	48 01 c2             	add    %rax,%rdx		// rdx=(rbp-0x10)+(rbp-0xc)<<2
    12cb:	48 8b 45 f8          	mov    -0x8(%rbp),%rax		// rax=(rbp-0x8)
    12cf:	48 01 d0             	add    %rdx,%rax		// rax=(rbp-0x8)+(rbp-0x10)+(rbp-0xc)<<2
    12d2:	0f b6 00             	movzbl (%rax),%eax		// eax=((rbp-0x8)+(rbp-0x10)+(rbp-0xc)<<2)
    12d5:	5d                   	pop    %rbp
    12d6:	c3                   	retq   

00000000000012d7 <main>:
    12d7:	f3 0f 1e fa          	endbr64 
    12db:	55                   	push   %rbp
    12dc:	48 89 e5             	mov    %rsp,%rbp
    12df:	c6 05 3d 2d 00 00 7b 	movb   $0x7b,0x2d3d(%rip)        # 4023 <a+0xb>
    12e6:	ba 03 00 00 00       	mov    $0x3,%edx
    12eb:	be 02 00 00 00       	mov    $0x2,%esi
    12f0:	48 8d 3d 21 2d 00 00 	lea    0x2d21(%rip),%rdi        # 4018 <a>
    12f7:	e8 4b ff ff ff       	callq  1247 <get_by_coordinates1>
    12fc:	0f be c0             	movsbl %al,%eax
    12ff:	89 c6                	mov    %eax,%esi
    1301:	48 8d 3d fc 0c 00 00 	lea    0xcfc(%rip),%rdi        # 2004 <_IO_stdin_used+0x4>
    1308:	b8 00 00 00 00       	mov    $0x0,%eax
    130d:	e8 3e fd ff ff       	callq  1050 <printf@plt>
    1312:	ba 03 00 00 00       	mov    $0x3,%edx
    1317:	be 02 00 00 00       	mov    $0x2,%esi
    131c:	48 8d 3d f5 2c 00 00 	lea    0x2cf5(%rip),%rdi        # 4018 <a>
    1323:	e8 50 ff ff ff       	callq  1278 <get_by_coordinates2>
    1328:	0f be c0             	movsbl %al,%eax
    132b:	89 c6                	mov    %eax,%esi
    132d:	48 8d 3d d0 0c 00 00 	lea    0xcd0(%rip),%rdi        # 2004 <_IO_stdin_used+0x4>
    1334:	b8 00 00 00 00       	mov    $0x0,%eax
    1339:	e8 12 fd ff ff       	callq  1050 <printf@plt>
    133e:	ba 03 00 00 00       	mov    $0x3,%edx
    1343:	be 02 00 00 00       	mov    $0x2,%esi
    1348:	48 8d 3d c9 2c 00 00 	lea    0x2cc9(%rip),%rdi        # 4018 <a>
    134f:	e8 54 ff ff ff       	callq  12a8 <get_by_coordinates3>
    1354:	0f be c0             	movsbl %al,%eax
    1357:	89 c6                	mov    %eax,%esi
    1359:	48 8d 3d a4 0c 00 00 	lea    0xca4(%rip),%rdi        # 2004 <_IO_stdin_used+0x4>
    1360:	b8 00 00 00 00       	mov    $0x0,%eax
    1365:	e8 e6 fc ff ff       	callq  1050 <printf@plt>
    136a:	b8 00 00 00 00       	mov    $0x0,%eax
    136f:	5d                   	pop    %rbp
    1370:	c3                   	retq   
    1371:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
    1378:	00 00 00 
    137b:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)

/*
 * arm
 */
000000000040055c <hang>:
  40055c:	d10043ff 	sub	sp, sp, #0x10
  400560:	b9000fff 	str	wzr, [sp, #12]		// x=0
  400564:	14000014 	b	4005b4 <hang+0x58>	// for x
  400568:	b9000bff 	str	wzr, [sp, #8]		// y=0
  40056c:	1400000c 	b	40059c <hang+0x40>	// for y
  400570:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  400574:	9100e002 	add	x2, x0, #0x38		// a
  400578:	b9800be0 	ldrsw	x0, [sp, #8]		// x0=y
  40057c:	b9800fe1 	ldrsw	x1, [sp, #12]		// x1=x
  400580:	d37ef421 	lsl	x1, x1, #2		// x1=x<<2
  400584:	8b010041 	add	x1, x2, x1		// x1=a+x<<2
  400588:	8b000020 	add	x0, x1, x0		// x0=a+x<<2+y
  40058c:	3900001f 	strb	wzr, [x0]		// [x0]=0
  400590:	b9400be0 	ldr	w0, [sp, #8]		// w0=y
  400594:	11000400 	add	w0, w0, #0x1		// y++
  400598:	b9000be0 	str	w0, [sp, #8]		// [sp+8]=y
  40059c:	b9400be0 	ldr	w0, [sp, #8]		// w0=y
  4005a0:	71000c1f 	cmp	w0, #0x3		// 0x3-y
  4005a4:	54fffe6d 	b.le	400570 <hang+0x14>
  4005a8:	b9400fe0 	ldr	w0, [sp, #12]		// w0=x
  4005ac:	11000400 	add	w0, w0, #0x1		// x++
  4005b0:	b9000fe0 	str	w0, [sp, #12]		// [sp+12]=x
  4005b4:	b9400fe0 	ldr	w0, [sp, #12]		// w0=x
  4005b8:	7100081f 	cmp	w0, #0x2		// 0x2-x
  4005bc:	54fffd6d 	b.le	400568 <hang+0xc>
  4005c0:	b9000bff 	str	wzr, [sp, #8]		// y=0
  4005c4:	1400000c 	b	4005f4 <hang+0x98>
  4005c8:	b9400be0 	ldr	w0, [sp, #8]		// w0=y
  4005cc:	12001c02 	and	w2, w0, #0xff		// w2=y&0xff
  4005d0:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  4005d4:	9100e001 	add	x1, x0, #0x38		// x1=a
  4005d8:	b9800be0 	ldrsw	x0, [sp, #8]		// x0=y
  4005dc:	8b000020 	add	x0, x1, x0		// x0=a+y
  4005e0:	2a0203e1 	mov	w1, w2			// w1=y&0xff
  4005e4:	39001001 	strb	w1, [x0, #4]		// [a+y+4]=y=0xff
  4005e8:	b9400be0 	ldr	w0, [sp, #8]		// w0=y
  4005ec:	11000400 	add	w0, w0, #0x1		// w0=y+1
  4005f0:	b9000be0 	str	w0, [sp, #8]		// [sp+8]=y+1
  4005f4:	b9400be0 	ldr	w0, [sp, #8]		// w0=y+1
  4005f8:	71000c1f 	cmp	w0, #0x3		// 0x3-(y+1)
  4005fc:	54fffe6d 	b.le	4005c8 <hang+0x6c>
  400600:	52800000 	mov	w0, #0x0                   	// #0
  400604:	910043ff 	add	sp, sp, #0x10
  400608:	d65f03c0 	ret

000000000040060c <lie>:
  40060c:	d10043ff 	sub	sp, sp, #0x10
  400610:	b9000fff 	str	wzr, [sp, #12]		// x=0
  400614:	14000014 	b	400664 <lie+0x58>	// for x
  400618:	b9000bff 	str	wzr, [sp, #8]		// y=0
  40061c:	1400000c 	b	40064c <lie+0x40>	// for y
  400620:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  400624:	9100e002 	add	x2, x0, #0x38		// x2=a
  400628:	b9800be0 	ldrsw	x0, [sp, #8]		// x0=y
  40062c:	b9800fe1 	ldrsw	x1, [sp, #12]		// x1=x
  400630:	d37ef421 	lsl	x1, x1, #2		// x1=x<<2
  400634:	8b010041 	add	x1, x2, x1		// x1=a+x<<2
  400638:	8b000020 	add	x0, x1, x0		// x0=a+x<<2+y
  40063c:	3900001f 	strb	wzr, [x0]		// a+x<<2+y=0
  400640:	b9400be0 	ldr	w0, [sp, #8]		// w0=y
  400644:	11000400 	add	w0, w0, #0x1		// y++
  400648:	b9000be0 	str	w0, [sp, #8]		
  40064c:	b9400be0 	ldr	w0, [sp, #8]		// w0=y
  400650:	71000c1f 	cmp	w0, #0x3		// w0-0x3
  400654:	54fffe6d 	b.le	400620 <lie+0x14>	// for y
  400658:	b9400fe0 	ldr	w0, [sp, #12]		// w0=x
  40065c:	11000400 	add	w0, w0, #0x1		// x++
  400660:	b9000fe0 	str	w0, [sp, #12]
  400664:	b9400fe0 	ldr	w0, [sp, #12]		// x0=x
  400668:	7100081f 	cmp	w0, #0x2		// w0-0x2
  40066c:	54fffd6d 	b.le	400618 <lie+0xc>	// for x

  400670:	b9000fff 	str	wzr, [sp, #12]		// x=0
  400674:	1400000d 	b	4006a8 <lie+0x9c>
  400678:	b9400fe0 	ldr	w0, [sp, #12]		// w0=x
  40067c:	12001c02 	and	w2, w0, #0xff		// w2=x&0ff
  400680:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  400684:	9100e001 	add	x1, x0, #0x38		// x1=a
  400688:	b9800fe0 	ldrsw	x0, [sp, #12]		// x0=x
  40068c:	d37ef400 	lsl	x0, x0, #2		// x0=x<<2
  400690:	8b000020 	add	x0, x1, x0		// x0=a+x<<2
  400694:	2a0203e1 	mov	w1, w2			// w1=x&0xff
  400698:	39000801 	strb	w1, [x0, #2]		// [a+x<<2+2]=x&0xff
  40069c:	b9400fe0 	ldr	w0, [sp, #12]		// w0=x
  4006a0:	11000400 	add	w0, w0, #0x1		// x++
  4006a4:	b9000fe0 	str	w0, [sp, #12]
  4006a8:	b9400fe0 	ldr	w0, [sp, #12]		// w0=x
  4006ac:	7100081f 	cmp	w0, #0x2		// x-0x2
  4006b0:	54fffe4d 	b.le	400678 <lie+0x6c>
  4006b4:	52800000 	mov	w0, #0x0                   	// #0
  4006b8:	910043ff 	add	sp, sp, #0x10
  4006bc:	d65f03c0 	ret

00000000004006c0 <get_by_coordinates1>:
  4006c0:	d10043ff 	sub	sp, sp, #0x10
  4006c4:	f90007e0 	str	x0, [sp, #8]		// [xp+8]=x0	parameter1
  4006c8:	b90007e1 	str	w1, [sp, #4]		// [sp+4]=x1	parameter2
  4006cc:	b90003e2 	str	w2, [sp]		// [sp]=w2	parameter3
  4006d0:	b98007e0 	ldrsw	x0, [sp, #4]		// x0=parameter2
  4006d4:	d37ef400 	lsl	x0, x0, #2		// x0=parameter2<<2
  4006d8:	f94007e1 	ldr	x1, [sp, #8]		// x1=parameter1
  4006dc:	8b000021 	add	x1, x1, x0		// x1=parameter1+parameter2<<2
  4006e0:	b98003e0 	ldrsw	x0, [sp]		// x0=parameter3
  4006e4:	38606820 	ldrb	w0, [x1, x0]		// w0=[parameter1+parameter2<<2+parameter3]
  4006e8:	910043ff 	add	sp, sp, #0x10
  4006ec:	d65f03c0 	ret

00000000004006f0 <get_by_coordinates2>:
  4006f0:	d10043ff 	sub	sp, sp, #0x10
  4006f4:	f90007e0 	str	x0, [sp, #8]		// parameter1
  4006f8:	b90007e1 	str	w1, [sp, #4]		// parameter2
  4006fc:	b90003e2 	str	w2, [sp]		// parameter3
  400700:	b94007e0 	ldr	w0, [sp, #4]		// w0=parameter2
  400704:	531e7401 	lsl	w1, w0, #2		// w1=parameter2<<2
  400708:	b94003e0 	ldr	w0, [sp]		// w0=parameter3
  40070c:	0b000020 	add	w0, w1, w0		// w0=parameter2<<2+parameter3
  400710:	93407c00 	sxtw	x0, w0			// x0=parameter2<<2+parameter3
  400714:	f94007e1 	ldr	x1, [sp, #8]		// x1=parameter1
  400718:	8b000020 	add	x0, x1, x0		// x0=parameter1+parameter2<<2+parameter3
  40071c:	39400000 	ldrb	w0, [x0]		// w0=[parameter1+parameter2<<2+parameter3]
  400720:	910043ff 	add	sp, sp, #0x10
  400724:	d65f03c0 	ret

0000000000400728 <get_by_coordinates3>:
  400728:	d10043ff 	sub	sp, sp, #0x10
  40072c:	f90007e0 	str	x0, [sp, #8]		// x0=parameter1
  400730:	b90007e1 	str	w1, [sp, #4]		// w1=parameter2
  400734:	b90003e2 	str	w2, [sp]		// w2=parameter3
  400738:	b94007e0 	ldr	w0, [sp, #4]		// w0=parameter2
  40073c:	531e7400 	lsl	w0, w0, #2		// w0=parameter2<<2
  400740:	93407c01 	sxtw	x1, w0			// x1=parameter2<<2
  400744:	b98003e0 	ldrsw	x0, [sp]		// x0=parameter3
  400748:	8b000020 	add	x0, x1, x0		// x0=parameter2<<2+parameter3
  40074c:	f94007e1 	ldr	x1, [sp, #8]		// x1=parameter1
  400750:	8b000020 	add	x0, x1, x0		// x0=parameter1+parameter2<<2+parameter3
  400754:	39400000 	ldrb	w0, [x0]		// w0=[parameter1+parameter2<<2+parameter3]
  400758:	910043ff 	add	sp, sp, #0x10
  40075c:	d65f03c0 	ret

0000000000400760 <main>:
  400760:	a9bf7bfd 	stp	x29, x30, [sp, #-16]!
  400764:	910003fd 	mov	x29, sp
  400768:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  40076c:	9100e000 	add	x0, x0, #0x38
  400770:	52800f61 	mov	w1, #0x7b                  	// #123
  400774:	39002c01 	strb	w1, [x0, #11]
  400778:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  40077c:	9100e000 	add	x0, x0, #0x38
  400780:	52800062 	mov	w2, #0x3                   	// #3
  400784:	52800041 	mov	w1, #0x2                   	// #2
  400788:	97ffffce 	bl	4006c0 <get_by_coordinates1>
  40078c:	12001c00 	and	w0, w0, #0xff
  400790:	2a0003e1 	mov	w1, w0
  400794:	90000000 	adrp	x0, 400000 <_init-0x3e8>
  400798:	9122c000 	add	x0, x0, #0x8b0
  40079c:	97ffff2d 	bl	400450 <printf@plt>
  4007a0:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  4007a4:	9100e000 	add	x0, x0, #0x38
  4007a8:	52800062 	mov	w2, #0x3                   	// #3
  4007ac:	52800041 	mov	w1, #0x2                   	// #2
  4007b0:	97ffffd0 	bl	4006f0 <get_by_coordinates2>
  4007b4:	12001c00 	and	w0, w0, #0xff
  4007b8:	2a0003e1 	mov	w1, w0
  4007bc:	90000000 	adrp	x0, 400000 <_init-0x3e8>
  4007c0:	9122c000 	add	x0, x0, #0x8b0
  4007c4:	97ffff23 	bl	400450 <printf@plt>
  4007c8:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  4007cc:	9100e000 	add	x0, x0, #0x38
  4007d0:	52800062 	mov	w2, #0x3                   	// #3
  4007d4:	52800041 	mov	w1, #0x2                   	// #2
  4007d8:	97ffffd4 	bl	400728 <get_by_coordinates3>
  4007dc:	12001c00 	and	w0, w0, #0xff
  4007e0:	2a0003e1 	mov	w1, w0
  4007e4:	90000000 	adrp	x0, 400000 <_init-0x3e8>
  4007e8:	9122c000 	add	x0, x0, #0x8b0
  4007ec:	97ffff19 	bl	400450 <printf@plt>
  4007f0:	52800000 	mov	w0, #0x0                   	// #0
  4007f4:	a8c17bfd 	ldp	x29, x30, [sp], #16
  4007f8:	d65f03c0 	ret

#endif
